package com.tangsm.spring.boot.fluent.mybatis.entity;

import cn.org.atool.fluent.mybatis.annotation.FluentMybatis;
import cn.org.atool.fluent.mybatis.annotation.TableField;
import cn.org.atool.fluent.mybatis.annotation.TableId;
import cn.org.atool.fluent.mybatis.base.RichEntity;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * DeptEntity: 数据映射实体定义
 *
 * @author Powered By Fluent Mybatis
 */
@SuppressWarnings({"rawtypes", "unchecked"})
@Data
@Accessors(
    chain = true
)
@EqualsAndHashCode(
    callSuper = false
)
@AllArgsConstructor
@NoArgsConstructor
@FluentMybatis(
    table = "sys_dept",
    schema = "nft_admin",
    desc = "部门表"
)
public class DeptEntity extends RichEntity {
  private static final long serialVersionUID = 1L;

  @TableId(
      value = "dept_id",
      desc = "部门id"
  )
  private Long deptId;

  @TableField(
      value = "ancestors",
      desc = "祖级列表"
  )
  private String ancestors;

  @TableField(
      value = "create_by",
      desc = "创建者"
  )
  private String createBy;

  @TableField(
      value = "create_time",
      desc = "创建时间"
  )
  private Date createTime;

  @TableField(
      value = "del_flag",
      desc = "删除标志（0代表存在 2代表删除）"
  )
  private String delFlag;

  @TableField(
      value = "dept_name",
      desc = "部门名称"
  )
  private String deptName;

  @TableField(
      value = "email",
      desc = "邮箱"
  )
  private String email;

  @TableField(
      value = "leader",
      desc = "负责人"
  )
  private String leader;

  @TableField(
      value = "order_num",
      desc = "显示顺序"
  )
  private Integer orderNum;

  @TableField(
      value = "parent_id",
      desc = "父部门id"
  )
  private Long parentId;

  @TableField(
      value = "phone",
      desc = "联系电话"
  )
  private String phone;

  @TableField(
      value = "status",
      desc = "部门状态（0正常 1停用）"
  )
  private String status;

  @TableField(
      value = "update_by",
      desc = "更新者"
  )
  private String updateBy;

  @TableField(
      value = "update_time",
      desc = "更新时间"
  )
  private Date updateTime;

  @Override
  public final Class entityClass() {
    return DeptEntity.class;
  }
}
